<template>
	<view class="card">
		<view class="card-left">{{couponName}}</view>
		<view class="card-right">
			<view class="card-info">{{couponRule==0?'满减券':"折扣券"}}</view>
			<strong class="card-time" v-if="couponRule==0">满{{Min_Amount}}减{{Preferential}}元</strong>
			<strong class="card-time" v-if="couponRule==1">满{{Min_Amount}}打{{Preferential}}折</strong>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			couponName: {
				type: String,
				default: "无"
			},
			couponRule: {
				type: String,
				default: "无"
			},
			Min_Amount: {
				type: String,
				default: "无"
			},
			Preferential: {
				type: String,
				default: "无"
			}
		},
		data() {
			return {
				
			}
		},

		methods: {},
	}
</script>

<style scoped>
	.card {
		display: flex;
		align-items: center;
		width: 540rpx;
		height: 120rpx;
		padding: 10px 0;
		background: #fff;
		border-radius: 8px;
		-webkit-mask-image: radial-gradient(circle at 88px 4px, transparent 4px, red 4.5px), radial-gradient(closest-side circle at 50%, red 99%, transparent 100%);
		-webkit-mask-size: 100%, 2px 4px;
		-webkit-mask-repeat: repeat, repeat-y;
		-webkit-mask-position: 0 -4px, 87px;
		-webkit-mask-composite: source-out;
		mask-composite: subtract;
		background: linear-gradient(45deg, orange, red);
	}

	.card-left {
		width: 88px;
		text-align: center;
		font-size: 18px;
		color: #fff;
	}

	.card-right {
		padding: 16px 12px;
		display: flex;
		flex: 1;
		flex-direction: column;
	}

	.card-info {
		margin: 0;
		font-size: 14px;
		line-height: 20px;
		color: #fff;
	}

	.card-time {
		font-size: 12px;
		line-height: 16px;
		font-weight: normal;
		color: #fff;
		margin-top: 4px;
	}
</style>